<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Services\LineService;
use Illuminate\Http\Request;

class LineController extends Controller
{
    private $lineService;
    public function __construct(LineService $lineService)
    {
        $this->lineService = $lineService;
    }
    public function lineList(Request $request)
    {
        $params = $request->input();
        $result = $this->lineService->lineList($params);
        return $this->responseSuccess($result);
    }


    public function lineStatusUpdate(Request $request)
    {
        $params = $request->input();
        $result = $this->lineService->lineStatusUpdate($params);
        if($result)
            return $this->responseSuccess($result);
        else
            return $this->responseError(400);
    }

    public function lineDel(Request $request)
    {
        $params = $request->input();
        $result = $this->lineService->lineDel($params);
        if($result)
            return $this->responseSuccess($result);
        else
            return $this->responseError(400);
    }
}
